package com.hjsmallfly.syllabus.repository.mock_lesson.remote

import com.hjsmallfly.syllabus.bean.SemesterData
import com.hjsmallfly.syllabus.ext.NI
import com.hjsmallfly.syllabus.ext.from_io
import com.hjsmallfly.syllabus.repository.mock_lesson.MockLessonDataSource
import com.hjsmallfly.syllabus.retrofitApi.GiteeApi
import com.hjsmallfly.syllabus.retrofitApi.LessonDetailApi
import com.hjsmallfly.syllabus.room.record.MockLesson
import rx.Observable

class MockLessonRemoteDataSource(
    private val giteeApi: GiteeApi,
    private val lessonDetailApi: LessonDetailApi
) : MockLessonDataSource {

    override fun queryNextSemester(): Observable<SemesterData> {
        return giteeApi.getNextSemester()
            .from_io()
    }

    override fun saveNextSemester(nextSemester: SemesterData) = NI
    override fun queryMockLesson(uid: Long, semester: SemesterData) = NI
    override fun saveMockLesson(uid: Long, mockLesson: MockLesson) = NI
}